<div class="main" style="background-color: white;">
	<div class="easyui-panel" style="border-style: none;">
		<form id="addForm" method="post" class="validate" enctype="multipart/form-data" >
			<table>
				<tr>
					<th>分类名称</th>
					<td>
						<input class="input_text easyui-validatebox" type="text" name="name" data-options="required:true" maxlength="15"></input>
					</td>

				</tr>
				<tr>
					<th>分类图片</th>
					<td>
						<input class="easyui-validatebox" type="file" id="file" name="file" data-options="required:false"></input>
					</td>
				</tr>
				<tr>
					<th>是否为顶级分类</th>
					<td>
						<input type="radio" name="cattype" class="cattype" value="0" checked="checked">否 
						&nbsp;&nbsp;&nbsp;&nbsp; 
						<input type="radio" name="cattype" class="cattype" value="1">是
					</td>
				</tr>
				<tr class="addtr">
					<th>上级分类</th>
					<td>
						<input class="easyui-combotree combo" name="parent_id" value="无"  data-options="url:'${ctx}/shop/admin/cat/add-list-json.do',method:'get',required:false,height:28" style="width: 300px;">
					</td>
				</tr>
				<tr>
					<th>商品类型</th>
					<td>
						<input class="easyui-combotree combo" name="type_id" data-options="url:'${ctx}/shop/admin/cat/type-list-json.do',method:'get',required:true,height:28" style="width: 300px;">
					</td>
				</tr>
				
				<tr>
					<th>排序</th>
					<td><input class="input_text easyui-numberbox" type="text" id="order" name="cat_order" data-options="required:true" value="0" maxlength="5"></input>
					</td>
				</tr>
				<tr>
					<!-- <th>列表中显示</th>
					<td style="padding: 2px 0 0 0">
						<input type="radio" name="list_show" value="1" checked="checked" />是&nbsp; 
						<input type="radio" name="list_show" value="0" />否</td> -->
						<input type="hidden" name="list_show" value="1" checked="checked" />
				</tr>
			</table>
		</form>
	</div>
</div>
<script>
	$(function() {
		$(".cattype").click(function() {
			if ($(this).val() == 1) {
				$(".addtr").hide();
			}
			if ($(this).val() == 0) {
				$(".addtr").show();
			}
		})
	});
</script>